import { IsNotEmpty, IsNumber, IsString, IsPhoneNumber, IsByteLength, Length, MinLength, MaxLength, isNotEmpty, IsEmail, IsIP } from "class-validator";
import { ApiProperty } from "@nestjs/swagger";

export class LoginUserDato {
    @IsNotEmpty()
    @IsString()
    @Length(4, 12, { message: "字符长度在4-12个之间" })
    username: string;

    @ApiProperty({ example: '12345678', description: '密码' })
    @IsNotEmpty({ message: '密码不能为空' })
    @MinLength(6, {
        message: '密码长度错误!',
    })
    @MaxLength(20, {
        message: '密码长度错误!',
    })
    password: string;

    id?: number
}